<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
	isELIgnored="false"%>
<%@ include file="/WEB-INF/common/path.jsp"%>
<%@ include file="/WEB-INF/common/tag.jsp"%>
<html>
<head>
 <base href="${basePath}">
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <title>本地生活服务详细</title>
 <script type="text/javascript" src="${path }/js/resource/jquery.js"></script>
  <script type="text/javascript" src="${path }/js/resource/topicDetail.js"></script>

 </head>
 <body>
 <div align="center"><div><h1>本地生活服务详细</h1></div>
 <div>
 	title:${topic.topicTitle }&nbsp;&nbsp;&nbsp;&nbsp;hot:${topic.topicHot }<br/>
 	<img src="${path }/${topic.product.productMainPicture}" height="200" width="200"/>商品名称:${topic.product.productName }&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:;" onclick="submitTopicGreat(${topic.topicGreatCount },this);">赞:${topic.topicGreatCount }</a><input type="button" value="关注该贴"/><input type="button" value="举报"/><br/>
 	折扣价:$${topic.product.productMarketPrice }<br/>
 	品牌:${topic.product.productBrand }<br/>
 	评分:${topic.product.productGrade}<br/>
 	购买人数:${topic.product.productSaleNum}<br/>
 	楼主说:${topic.topicString }///uid:${topic.uid }<br/>
 	<input type="button" value="购买"/><input type="button" value="加入购物车"/>
 </div>
 <!-- 楼主最新三条帖子 -->
 <div></div>
 <!-- 所有帖子.时间最新排列 -->
 <div>
 <!-- 分页信息 -->
 <input type="hidden" name="topicUserId" value=${topic.uid }>
 <input type="hidden" name="page" value="${page }">
  <input type="hidden" name="topicId" value="${tid }">
  <input type="hidden" name="hasNextPage" value="${hasNextPage }">
  <input type="hidden" name="submitContentForm" value="0"/>
  
  <div  id="topic_content">
  <table id="content_table">
	  <s:if test="topicContentList != null && topicContentList.size >0">
	  	<s:iterator value="topicContentList" var="list">
	  		<tr id="tr_${id }"><td><span style="color:red">这是评论</span></td><td>id:${id }</td><td>uid:${fromUser.id }</td><td><img alt="" src="${path }${fromUser.userPicture}" width="40" height="40"><a href="javascript:;" onclick="showSubmitForm('${fromUser.name }',${id},${fromUser.id });">回复</a></td><td>name:${fromUser.name }</td><td>内容:${content }</td><td>发表时间:${createTime }</td><td><a href="javascript:;" onclick="submitContentGreat(${id},${greateTimes },this);">赞:${greateTimes }</a></td><td></td></tr>
	  		<table id="huifu_${id }" style="margin-left: 400px">
	  		<s:if test="subContentList != null">
	  			<s:iterator value="subContentList" >
	  				<tr id="huifuTr_${id }"><td>id:${id }</td><td><img alt="" src="${path }${fromUser.userPicture}" width="40" height="40">uid:${fromUser.id }//name:${fromUser.name }</td><td><span style="color:red"><a href="javascript:;" onclick="showSubmitForm('${fromUser.name }',${list.id},${list.fromUser.id });">回复</a></span>id:${toUser.id}//${toUser.name }</td><td>内容:${content }</td><td>发表时间:${createTime }</td><td>赞:${greateTimes }</td></tr>
	  			</s:iterator>
	  		</s:if>
	  		</table>
	  	</s:iterator>
	  </s:if>
  </table>
  </div>
  <!-- 分页 -->
  <div id="pageDiv">
  <s:if test="hasNextPage  && page > 1">
  		<input type="button" name="prevPage" value="上一页">当前第<span style="color:red" id="pageNumSpan">${page }</span>页<input type="button" name="nextPage" value="下一页" >
  	</s:if>
  	<s:elseif test="hasNextPage == false&& page > 1">
  		<input type="button" name="prevPage" value="上一页">当前第<span style="color:red" id="pageNumSpan">${page }</span>页><input type="button" name="nextPage" value="下一页" disabled="disabled">
  	</s:elseif>
  		<s:elseif test="hasNextPage && page == 1">
  		<input type="button" name="prevPage" value="上一页" disabled="disabled">当前第<span style="color:red" id="pageNumSpan">${page }</span>页<input type="button" name="nextPage" value="下一页">
  	</s:elseif>
  	<s:elseif test="hasNextPage == false && page == 1">
  		<input type="button" name="prevPage" value="上一页" disabled="disabled">当前第<span style="color:red" id="pageNumSpan">${page }</span>页<input type="button" name="nextPage" value="下一页" disabled="disabled">
  	</s:elseif>
  </div>
  
 </div>
 
 回复:<div>
 	<script type="text/javascript"charset="utf-8" src="${path }/js/ueditor/ueditor.config.js"></script>
	<script type="text/javascript"charset="utf-8" src="${path }/js/ueditor/ueditor.all.min.js"> </script>
 	<script type="text/plain" id="discussContent" name="myContent"></script>
    <script type="text/javascript">
     var option = {
        initialContent: '回复请点这里哟...',//初始化编辑器的内容
        //textarea:'editorValue',//设置提交时编辑器内容的名字
        initialFrameWidth:600,  //初始化编辑器宽度,默认1000，可以设置成百分比
        initialFrameHeight:222,  //初始化编辑器高度,默认320
        autoClearinitialContent:true  //是否自动清除编辑器初始内容
        
        ,wordCount:true          //是否开启字数统计
        ,maximumWords:140       //允许的最大字符数
        ,wordOverFlowMsg:'<span style="color:red;">不好意思哟,输入的字符个数已经超出</span>'
        ,'fontfamily':[
          { label:'',name:'yahei',val:'微软雅黑,Microsoft YaHei'}]
		,'fontsize':[ 14]
		,pasteplain:true
        }
        UE.getEditor('discussContent',option);
    </script>
    <!-- 视频点击打开收起 -->
    <script type="text/javascript">
	openEmbed = function(obj){
		var obj = $(obj);
		var focusDiv = obj.parent();
		var embedObj = focusDiv.parent().find('div.emb_div');
		focusDiv.hide();
		embedObj.show();
	}
	hideEmbed = function(obj){
		var obj = $(obj);
		var embedObj = obj.parent();
		var focusDiv = embedObj.parent().find('div.focus_div');
		embedObj.hide();
		focusDiv.show();
	}
</script>
    <input type="button" value="确认" name="submitTopicContent">
 </div>
</div>
 </body>
 </html>